
   <?php
use Application\Model\vn3dUtil;

$action='index';
$route='product';
?>

<script>
<!--
$('#news').attr('class','active');
//-->
</script>
<ol class="breadcrumb">
			<li><a href="/admin/category/">Menu</a></li>
			<li><a href="/admin/category/group-product/<?php echo $menuId;?>">Nhóm sản phẩm</a></li>
			<li class="active">Sản phẩm</li>
</ol>
<div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Danh sách sản phẩm</h3>
            </div>
            <br>
            &nbsp<a role="button" class="btn btn-primary btn-xs" href="/admin/product/add/<?php echo $groupProductID;?>">Tạo mới sản phẩm</a>
            <hr>
            <div class="panel-body">
            <table class="table">
			<thead>
				<tr>
					<th>#</th>
					<th>Tên</th>
					<th>Sửa</th>
					<th>Xóa</th>
				</tr>
			</thead>
			<tbody>
            <?php foreach ($paginator as $key => $product) :
            $urlSeo=vn3dUtil::convertUrlSeo($product->name);

            ?>

 <tr>
					<td><?php echo $key+1;?></td>
					<td><a
					title="click để xem nhóm sản phẩm trong mennu"
						href="/store/product/<?php echo $product->id;?>/<?php echo $urlSeo;?>"
						><?php echo $product->name;  ?></a></td>
					<td><a
						href="/admin/product/edit/<?php echo $product->id;?>/<?php echo $product->category_id;?>"
						class="btn btn-info btn-xs" role="button">Sửa</a></td>
					<td><a
						href="/admin/product/delete/<?php echo $product->id;?>/<?php echo $product->category_id;?>"
						class="btn btn-danger btn-xs" role="button">Xóa</a></td>

				</tr>

<?php endforeach; ?>
</tbody>
		</table>
		<hr />
		<center>
<?php

	echo $this->paginationControl ( $paginator, 'Sliding', '/layout/slidePaginator.phtml', array (
			'action' => $action,
            'route' => $route,
			'order_by' => $order_by,
			'order' => $order,
            'groupProductID'=>$groupProductID
	) );
	?>
</center>
                 </div>
          </div>